/* Description error
 * lfs_error.h
 *
 *  Created on: Dec 8, 2012
 *      Author: duoln
 */

#ifndef LFS_ERROR_H_
#define LFS_ERROR_H_

/**
 * LFS message
 */
typedef enum _lfs_status_
{
    LFS_INIT = -1,
    LFS_FAIL = 0,
    LFS_SUCC = 1,
    LFS_FILE_NOT_EXIST = 20,
    LFS_FILE_IS_EXIST = 21,
    LFS_PATH_NOT_EXIST = 22,
    LFS_NOT_IMPLEMENT = 30,
    LFS_INVALID_PARAM = 40,
    LFS_LACK_OF_RESOURCE = 50,
    LFS_REMOTE_FAIL = 60,
    LFS_SERVER_BUSY = 70,
} Status;

#define LFS_INIT_MSG            "LFS_INIT"
#define LFS_FAIL_MSG            "LFS_FAIL"
#define LFS_SUCC_MSG            "LFS_SUCC"
#define LFS_FILE_NOT_EXIST_MSG  "LFS_FILE_NOT_EXIST"
#define LFS_FILE_IS_EXIST_MSG   "LFS_FILE_IS_EXIST"
#define LFS_NOT_IMPLEMENT_MSG   "LFS_NOT_IMPLEMENT"
#define LFS_INVALID_PARAM_MSG   "LFS_INVALID_PARAM"

#define LFS_PATH_NOT_EXIST_MSG  "LFS_PATH_NOT_EXIST"
#define LFS_LACK_OF_RESOURCE_MSG "LFS_LACK_OF_RESOURCE"
#define LFS_REMOTE_FAIL_MSG     "LFS_REMOTE_FAIL"
#define LFS_SERVER_BUSY_MSG     "LFS_SERVER_BUSY"

#define LFS_INVALID_ERRORCODE   "LFS_INVALID_ERRORCODE"

char* lfs_msg(int32_t code);

#endif /* LFS_ERROR_H_ */
